home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / pcmreg / pcmreg.exe / Sample.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-04-08  |  4.9 KB  |  172 lines

  1. VERSION 5.00
  2. Object = "{AE02E100-EB71-11D2-8B40-000000000000}#44.0#0"; "PCMREG1.ocx"
  3. Begin VB.Form Sample 
  4.    Caption         =   "Sample REG"
  5.    ClientHeight    =   4035
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4230
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   4035
  11.    ScaleWidth      =   4230
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin PCMREG.REG REG1 
  14.       Left            =   3480
  15.       Top             =   120
  16.       _ExtentX        =   1085
  17.       _ExtentY        =   1085
  18.       KeyCode         =   "mykeycode1"
  19.       TrialDays       =   "30"
  20.    End
  21.    Begin VB.TextBox Text2 
  22.       Height          =   285
  23.       Left            =   3000
  24.       TabIndex        =   10
  25.       Text            =   "30"
  26.       Top             =   2880
  27.       Width           =   975
  28.    End
  29.    Begin VB.TextBox Text1 
  30.       Height          =   285
  31.       Left            =   360
  32.       TabIndex        =   9
  33.       Top             =   2880
  34.       Width           =   2055
  35.    End
  36.    Begin VB.CommandButton Command3 
  37.       Caption         =   "Run"
  38.       Height          =   375
  39.       Left            =   1680
  40.       TabIndex        =   2
  41.       Top             =   3360
  42.       Width           =   855
  43.    End
  44.    Begin VB.CommandButton Command2 
  45.       Caption         =   "Update"
  46.       Height          =   375
  47.       Left            =   240
  48.       TabIndex        =   1
  49.       Top             =   3360
  50.       Width           =   855
  51.    End
  52.    Begin VB.CommandButton Command1 
  53.       Caption         =   "Exit"
  54.       Height          =   375
  55.       Left            =   3120
  56.       TabIndex        =   0
  57.       Top             =   3360
  58.       Width           =   855
  59.    End
  60.    Begin VB.Label Label11 
  61.       Caption         =   "Label11"
  62.       Height          =   255
  63.       Left            =   120
  64.       TabIndex        =   13
  65.       Top             =   1680
  66.       Width           =   2055
  67.    End
  68.    Begin VB.Label Label10 
  69.       Caption         =   "Days:"
  70.       Height          =   255
  71.       Left            =   2520
  72.       TabIndex        =   12
  73.       Top             =   2880
  74.       Width           =   495
  75.    End
  76.    Begin VB.Label Label9 
  77.       Caption         =   "Key:"
  78.       Height          =   255
  79.       Left            =   0
  80.       TabIndex        =   11
  81.       Top             =   2880
  82.       Width           =   495
  83.    End
  84.    Begin VB.Label Label6 
  85.       Caption         =   "Label6"
  86.       Height          =   255
  87.       Left            =   120
  88.       TabIndex        =   8
  89.       Top             =   2280
  90.       Width           =   2415
  91.    End
  92.    Begin VB.Label Label5 
  93.       Caption         =   "Label5"
  94.       Height          =   255
  95.       Left            =   120
  96.       TabIndex        =   7
  97.       Top             =   1440
  98.       Width           =   1935
  99.    End
  100.    Begin VB.Label Label4 
  101.       Caption         =   "Label4"
  102.       Height          =   255
  103.       Left            =   120
  104.       TabIndex        =   6
  105.       Top             =   1200
  106.       Width           =   1935
  107.    End
  108.    Begin VB.Label Label3 
  109.       Caption         =   "Label3"
  110.       Height          =   255
  111.       Left            =   120
  112.       TabIndex        =   5
  113.       Top             =   600
  114.       Width           =   2775
  115.    End
  116.    Begin VB.Label Label2 
  117.       Caption         =   "Label2"
  118.       Height          =   255
  119.       Left            =   120
  120.       TabIndex        =   4
  121.       Top             =   360
  122.       Width           =   2775
  123.    End
  124.    Begin VB.Label Label1 
  125.       Caption         =   "Label1"
  126.       Height          =   255
  127.       Left            =   120
  128.       TabIndex        =   3
  129.       Top             =   120
  130.       Width           =   2775
  131.    End
  132. Attribute VB_Name = "Sample"
  133. Attribute VB_GlobalNameSpace = False
  134. Attribute VB_Creatable = False
  135. Attribute VB_PredeclaredId = True
  136. Attribute VB_Exposed = False
  137. Private Sub Command1_Click()
  138. End Sub
  139. Private Sub Command2_Click()
  140. REG1.EnterkeyCode = Text1.Text
  141. REG1.TrialDays = Text2.Text
  142. With REG1
  143. Label1.Caption = "Todays Date: " & .Today
  144. Label2.Caption = "Start Date " & .StartDate
  145. Label3.Caption = "End Date: " & .EndDate
  146. Label4.Caption = "Trial Days: " & .TrialDays
  147. Label5.Caption = "Days Left: " & .DaysLeft
  148. Label11.Caption = "Time Up = " & .Timeup
  149. Label6.Caption = "KeyCode Is: " & .KeyCode
  150. End With
  151. End Sub
  152. Private Sub Command3_Click()
  153. With REG1
  154.     If .Timeup = True And .Registered = False Then
  155.     MsgBox "Please Enter A Valid KeyCode!", vbCritical
  156.     Else
  157.     MsgBox "Thank You Your Program Will Now Continue", vbInformation
  158.     End If
  159. End With
  160. End Sub
  161. Private Sub Form_Load()
  162. With REG1
  163. Label1.Caption = "Todays Date: " & .Today
  164. Label2.Caption = "Start Date " & .StartDate
  165. Label3.Caption = "End Date: " & .EndDate
  166. Label4.Caption = "Trial Days: " & .TrialDays
  167. Label5.Caption = "Days Left: " & .DaysLeft
  168. Label11.Caption = "Time Up = " & .Timeup
  169. Label6.Caption = "KeyCode Is: " & .KeyCode
  170. End With
  171. End Sub
  172.